Skip to content

fix(cable): return ConnectionFailed for both Terminated paths#222

Merged
AlfioEmanueleFresta merged 1 commit into
masterfrom
fix/cable-wait-for-connection-error
May 19, 2026
Merged

fix(cable): return ConnectionFailed for both Terminated paths#222
AlfioEmanueleFresta merged 1 commit into
masterfrom
fix/cable-wait-for-connection-error

Conversation

@AlfioEmanueleFresta
Copy link
Copy Markdown
Member

Summary

wait_for_connection returned ConnectionLost on an entry-time Terminated but ConnectionFailed on a transition-time Terminated. The caller can't observe which path it took, so the two variants are an accidental asymmetry that makes downstream matches fragile. Both paths now return ConnectionFailed.

Test plan

  • cargo build -p libwebauthn
  • cargo test -p libwebauthn

wait_for_connection returned ConnectionLost when the channel was already
Terminated on entry, but ConnectionFailed when it became Terminated during
the changed() await. The caller can't observe which path it took, so the
two variants are an accidental asymmetry that makes downstream matches
fragile. Both paths now return ConnectionFailed.
@AlfioEmanueleFresta AlfioEmanueleFresta merged commit 86c7c51 into master May 19, 2026
4 checks passed
@AlfioEmanueleFresta AlfioEmanueleFresta deleted the fix/cable-wait-for-connection-error branch May 19, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant